package com.mew.chess.core.game.shbz.game.message;

import com.mew.chess.core.game.shbz.game.common.FishBO;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FishPushMessage extends ZebraBaseMessage<FishPushMessage> {


    private FishBO[] fishBOs;

    @Override
    public void write(ByteBuf byteBuf) {

        writeInt(byteBuf,fishBOs.length);
        for (FishBO fishBO : fishBOs) {
            fishBO.write(byteBuf);
        }
    }


    @Override
    public FishPushMessage read(ByteBuf byteBuf) {
        return null;
    }
}
